package net.mhelvens.deltaprofiles;

import android.app.Application;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;

public class DeltaProfilesApplication extends Application {
	private static final String TAG = DeltaProfilesApplication.class.getSimpleName();

	private SharedPreferences _prefs;
	
	@Override
	public void onCreate() {
		Log.d(TAG, "onCreate'd");
		super.onCreate();
		
		DeltaProfilesDB.setContext(this);
		Rule           .setContext(this);
		Condition      .setContext(this);
		
		_prefs = PreferenceManager.getDefaultSharedPreferences(this);
		//_prefs.registerOnSharedPreferenceChangeListener(new SharedPreferences.OnSharedPreferenceChangeListener() {
		//	@Override
		//	public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
		//		
		//	}
		//});
	}
	
	public boolean activationHelpShown() {
		return _prefs.getBoolean("show_activation_help", true);
	}
}
